package com.party.model;

import java.io.Serializable;

public class SysAreas implements Serializable {
    private Integer areaid;

    private String name;

    private String joinname;

    private Integer parentid;

    private Short vieworder;

    private static final long serialVersionUID = 1L;

    public Integer getAreaid() {
        return areaid;
    }

    public void setAreaid(Integer areaid) {
        this.areaid = areaid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getJoinname() {
        return joinname;
    }

    public void setJoinname(String joinname) {
        this.joinname = joinname == null ? null : joinname.trim();
    }

    public Integer getParentid() {
        return parentid;
    }

    public void setParentid(Integer parentid) {
        this.parentid = parentid;
    }

    public Short getVieworder() {
        return vieworder;
    }

    public void setVieworder(Short vieworder) {
        this.vieworder = vieworder;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysAreas other = (SysAreas) that;
        return (this.getAreaid() == null ? other.getAreaid() == null : this.getAreaid().equals(other.getAreaid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getJoinname() == null ? other.getJoinname() == null : this.getJoinname().equals(other.getJoinname()))
            && (this.getParentid() == null ? other.getParentid() == null : this.getParentid().equals(other.getParentid()))
            && (this.getVieworder() == null ? other.getVieworder() == null : this.getVieworder().equals(other.getVieworder()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAreaid() == null) ? 0 : getAreaid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getJoinname() == null) ? 0 : getJoinname().hashCode());
        result = prime * result + ((getParentid() == null) ? 0 : getParentid().hashCode());
        result = prime * result + ((getVieworder() == null) ? 0 : getVieworder().hashCode());
        return result;
    }
}